﻿using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

namespace Sizebox.CharacterEditor
{
	// Token: 0x0200026F RID: 623
	public class SkeletonEditOptionsGui : MonoBehaviour
	{
		// Token: 0x1700019B RID: 411
		// (get) Token: 0x06000DC6 RID: 3526 RVA: 0x0006BB70 File Offset: 0x00069D70
		public SkeletonEditOptions Options
		{
			get
			{
				return this.options;
			}
		}

		// Token: 0x06000DC7 RID: 3527 RVA: 0x0006BB78 File Offset: 0x00069D78
		private void Awake()
		{
			if (this.movementSpeedSlider)
			{
				this.movementSpeedSlider.onValueChanged.AddListener(new UnityAction<float>(this.MovementSlider));
				this.MovementSlider(this.movementSpeedSlider.value);
			}
			if (this.movePairs)
			{
				this.movePairs.onValueChanged.AddListener(new UnityAction<bool>(this.MovePairs));
				this.MovePairs(this.movePairs.isOn);
			}
			if (this.rotatePairs)
			{
				this.rotatePairs.onValueChanged.AddListener(new UnityAction<bool>(this.RotatePairs));
				this.RotatePairs(this.rotatePairs.isOn);
			}
			if (this.invertX)
			{
				this.invertX.onValueChanged.AddListener(new UnityAction<bool>(this.InvertX));
				this.InvertX(this.invertX.isOn);
			}
			if (this.invertY)
			{
				this.invertY.onValueChanged.AddListener(new UnityAction<bool>(this.InvertY));
				this.InvertY(this.invertY.isOn);
			}
			if (this.invertZ)
			{
				this.invertZ.onValueChanged.AddListener(new UnityAction<bool>(this.InvertZ));
				this.InvertZ(this.invertZ.isOn);
			}
			if (this.scalePairs)
			{
				this.scalePairs.onValueChanged.AddListener(new UnityAction<bool>(this.ScalePairs));
				this.ScalePairs(this.scalePairs.isOn);
			}
			if (this.scaleWithoutChildren)
			{
				this.scaleWithoutChildren.onValueChanged.AddListener(new UnityAction<bool>(this.ScaleWithoutChildren));
				this.ScaleWithoutChildren(this.scaleWithoutChildren.isOn);
			}
		}

		// Token: 0x06000DC8 RID: 3528 RVA: 0x0006BD6D File Offset: 0x00069F6D
		private void MovementSlider(float value)
		{
			this.options.movement.speed = value;
		}

		// Token: 0x06000DC9 RID: 3529 RVA: 0x0006BD80 File Offset: 0x00069F80
		private void MovePairs(bool value)
		{
			this.options.movement.effectPairs = value;
		}

		// Token: 0x06000DCA RID: 3530 RVA: 0x0006BD93 File Offset: 0x00069F93
		private void RotatePairs(bool value)
		{
			this.options.rotation.effectPairs = value;
		}

		// Token: 0x06000DCB RID: 3531 RVA: 0x0006BDA6 File Offset: 0x00069FA6
		private void InvertX(bool value)
		{
			this.options.rotation.invertX = value;
		}

		// Token: 0x06000DCC RID: 3532 RVA: 0x0006BDB9 File Offset: 0x00069FB9
		private void InvertY(bool value)
		{
			this.options.rotation.invertY = value;
		}

		// Token: 0x06000DCD RID: 3533 RVA: 0x0006BDCC File Offset: 0x00069FCC
		private void InvertZ(bool value)
		{
			this.options.rotation.invertZ = value;
		}

		// Token: 0x06000DCE RID: 3534 RVA: 0x0006BDDF File Offset: 0x00069FDF
		private void ScalePairs(bool value)
		{
			this.options.scaling.effectPairs = value;
		}

		// Token: 0x06000DCF RID: 3535 RVA: 0x0006BDF2 File Offset: 0x00069FF2
		private void ScaleWithoutChildren(bool value)
		{
			this.options.scaling.scaleWithoutChildren = value;
		}

		// Token: 0x040012A9 RID: 4777
		[SerializeField]
		private SkeletonEditOptions options;

		// Token: 0x040012AA RID: 4778
		[Header("Movement Options")]
		[SerializeField]
		private Slider movementSpeedSlider;

		// Token: 0x040012AB RID: 4779
		[SerializeField]
		private Toggle movePairs;

		// Token: 0x040012AC RID: 4780
		[Header("Rotation Options")]
		[SerializeField]
		private Toggle rotatePairs;

		// Token: 0x040012AD RID: 4781
		[SerializeField]
		private Toggle invertX;

		// Token: 0x040012AE RID: 4782
		[SerializeField]
		private Toggle invertY;

		// Token: 0x040012AF RID: 4783
		[SerializeField]
		private Toggle invertZ;

		// Token: 0x040012B0 RID: 4784
		[Header("Scaling Options")]
		[SerializeField]
		private Toggle scalePairs;

		// Token: 0x040012B1 RID: 4785
		[SerializeField]
		private Toggle scaleWithoutChildren;
	}
}
